#ifndef MESSAGEBOXWIDGET_H
#define MESSAGEBOXWIDGET_H

#include <QWidget>
#include<QCloseEvent>
namespace Ui {
class MessageBoxWidget;
}

class MessageBoxWidget : public QWidget
{
    Q_OBJECT

public:
    enum MesType { Info, Warning, Error };
    explicit MessageBoxWidget(QWidget *parent = nullptr);
    ~MessageBoxWidget();

    void setMessageBox(const QString &text,MesType type=Info,QWidget* parent = nullptr);

    void closeEvent(QCloseEvent *event) override;

private slots:
    void on_confirmBtn_clicked();

    void on_cancelBtn_clicked();

signals:
    void confirmSignal();
    void cancelSignal();
private:
    Ui::MessageBoxWidget *ui;
    bool isConfirm;
};

#endif // MESSAGEBOXWIDGET_H
